package link.doublyCircularLinkedListSentinel;

/**
 * @author czt
 * @version 1.0
 * @since 2024/12/12
 */
public class DoublyCircularLinkedListSentinelTest {
    public static void main(String[] args) {
        DoublyCircularLinkedListSentinel linkedListSentinel = new DoublyCircularLinkedListSentinel();
//        linkedListSentinel.addFirst(5);
//        linkedListSentinel.addFirst(4);
//        linkedListSentinel.addFirst(3);
//        linkedListSentinel.addFirst(2);
//        linkedListSentinel.addFirst(1);
        linkedListSentinel.addLast(1);
        linkedListSentinel.addLast(2);
        linkedListSentinel.addLast(3);
        linkedListSentinel.addLast(4);
        linkedListSentinel.addLast(5);

        linkedListSentinel.removeLast();
        for (Integer i : linkedListSentinel) {
            System.out.println("i = " + i);
        }
        System.out.println("==================");

        linkedListSentinel.removeLast();
        for (Integer i : linkedListSentinel) {
            System.out.println("i = " + i);
        }
        System.out.println("==================");

        linkedListSentinel.removeLast();
        for (Integer i : linkedListSentinel) {
            System.out.println("i = " + i);
        }
        System.out.println("==================");

        linkedListSentinel.removeLast();
        for (Integer i : linkedListSentinel) {
            System.out.println("i = " + i);
        }
        System.out.println("==================");

        linkedListSentinel.removeLast();
        for (Integer i : linkedListSentinel) {
            System.out.println("i = " + i);
        }

    }
}
